var app = getApp();
Page(Object.assign({}, {
    data:{
        inited : false,
        form : {},
        showqun : false,
        shopid : 0,
        sharedata : {},
		siteroot : app.siteInfo.siteroot.replace('app/index.php', ''),uniacid: app.siteInfo.uniacid,
    },
    onLoad:function(options){
        var self = this;

        app.com.auth(function(){
            app.com.http('admin','POST',{op:'getjifen',code:options.scene},0,false,'','',function(res){
                if (res.data) {
                    self.setData({
                        shopid : res.data.data.shopid,
                        tips : res.data.data.tips,
                    },function(){
                        self.setData({
                            inited : true,
                        });
						
						wx.setNavigationBarTitle({
							title:  '领取'+res.data.data.params.jfbname,
						});
						
                    });
                    // 关闭下拉刷新
                    wx.stopPullDownRefresh();
                }
            });
        });
    },
    addthis : function(e){
        this.setData({
            money : e.currentTarget.dataset.m
        })
    },
    location : function( e ){
        app.com.location( e );
    },
    otherapp : function( e ){
        app.com.otherapp( e );
    },
    navigateto : function( e ){
        app.com.navigateto( e,this.data.tid );
    },
    redirectto : function( e ){
        app.com.redirectto( e,this.data.tid );
    },    
    callphone : function(e){
        app.com.callphone( e );
    },
    footNavigate(e){
        var url = e.currentTarget.dataset.url;
        wx.switchTab({
          url: url
        })
    },
    showimages : function( e ){
        app.com.showimages( e );
    }
}))